<template>
  <div>

    <el-row>
      <el-col :span="24">
        <div class="grid-content bg-purple-dark">
          <h2>出库信息详情</h2>
        </div>
      </el-col>
    </el-row>

    <el-card class="box-card">
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>供应商名称:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{ clientName }}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>销售员:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{ realName }}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>销售时间:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{ date }}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>订单金额:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{ sumNumber }}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>送货地址:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{ address }}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="24"><div class="grid-content bg-purple-dark">
          <el-table
              :data="tableData"
              style="width: 100%">
            <el-table-column
                prop="stockBean.productBean.productName"
                label="商品名称"
                align="center">
            </el-table-column>
            <el-table-column
                prop="stockBean.productBean.productFirm"
                label="厂家"
                align="center">
            </el-table-column>
            <el-table-column
                prop="makeMoney"
                label="成交价"
                align="center">
            </el-table-column>
            <el-table-column
                prop="number"
                label="出数量"
                align="center">
            </el-table-column>
          </el-table>
        </div></el-col>
      </el-row>
      <p/>

      <el-button type="success" @click="returns">返回</el-button>
    </el-card>

  </div>
</template>

<script>
export default {
  name: "findById",
  data() {
    return {
      tableData:'',

      orderRecordId: 0,
      clientName:'',
      realName:'',
      date:'',
      sumNumber:'',
      address:''
    }
  },
  methods:{
    init(id){
      this.orderRecordId=id
      let params = {
        orderRecordId:id
      }
      this.$axios.get('drp/orderrecord/findById', {params: params}).then(
          r => {
            console.log(r.data )
            this.clientName=r.data.clientBean.clientName
            this.realName=r.data.userBean.realName
            this.date=r.data.date
            this.sumNumber=r.data.sumNumber
            this.address=r.data.address
            this.tableData=r.data.orderRecordDetailBeanList
          }
      )
    },
    returns(){
      location.href="/index"
    }
  }
}
</script>

<style scoped>

</style>